package ysm.controller.admin;

import java.util.Date;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import ysm.entity.Notice;
import ysm.service.NoticeService;

@RestController
public class NoticeController {

	@Autowired
	private NoticeService noticeService;
	
	@RequestMapping("/admin/insertNotice")
	public void insertNotice(Notice record) {
		noticeService.insert(record);
	}
	
	@RequestMapping("loadAllNotice")
	public List loadAllNotice() {
		return noticeService.loadAllNotice();
	}
	
	@RequestMapping("/admin/changeIsshow")
	public void changeIsshow(Notice record) {
		noticeService.changeIsshow(record);
	}
	
	@RequestMapping("/admin/deleteByPrimaryKey")
	public void deleteByPrimaryKey(Integer id) {
		noticeService.deleteByPrimaryKey(id);
	}
	
	@RequestMapping("/admin/addNotice")
	public void addNotice(Notice record) {
		noticeService.addNotice(record);
	}
}
